package com.lagou.client;

import org.apache.curator.framework.api.CuratorWatcher;
import org.apache.zookeeper.WatchedEvent;
import org.apache.zookeeper.Watcher;

public class MyCuratorWatcher implements CuratorWatcher {
    @Override
    public void process(WatchedEvent watchedEvent) throws Exception {
        if(watchedEvent.getType() == Watcher.Event.EventType.NodeChildrenChanged) {
            RpcConsumer.refresh();
        }
    }
}
